//import cloudOptions from '@/common/config/cloudOptions.js'
//const db = uniCloud.databaseForJQL(cloudOptions);
const db = uniCloud.databaseForJQL();
const T_Cats = 'xasa-categories';
const T_Ver = 'xasa-version';
const T_Menu = 'xasa-index-menus';
const loadCategories = () => {
	return db.collection(T_Cats).field('_id as value,name as text,sort,shortname,icon').orderBy('sort').get();
}
const getVersion = (where) => {
	return db.collection(T_Ver).where(where).get({
		getOne: true
	})
}
const getIndexMenus = (where) => {
	return db.collection(T_Menu).orderBy('enable desc,sort').get()
}
export {
	loadCategories,
	getVersion,
	getIndexMenus
}